<!--
 * @Description: 
 * @Author: charles
 * @Date: 2021-07-14 15:08:24
 * @LastEditors: 晋龍
 * @LastEditTime: 2022-01-07 14:26:00
-->
<template>
  <div ref="bottom1_container">bottom1</div>
</template>
import {get} from "../../../util/"
<script>
export default {
  data(){
    return{
      dataArr:[]
    }
  },
  mounted(){
    this.initData()
  },
  methods: {
    initData(){
      get('/dashboard/queryDeviceOnlineNumber').then(res=>{
        console.log(3333,res);
        this.dataArr = res.data
        this.initData()
      })
    },
    initChart(){
      const pie = new Pie(this.$refs.bottom1_container,{
        appendPadding:10,
        data:this.dataArr,
        angleField:'value',
        colorField:'type',
        radius:0.9,
        interaction:[{type:'element-active'}],
      })
      pie.render()
    }
  },
}
</script>